package com.jn.erp.wechat.staff.api.controller;

import com.jn.erp.common.core.result.AjaxResult;
import com.jn.erp.web.api.course.entity.vo.DataTrendsVo;
import com.jn.erp.web.api.student.service.StudentService;
import com.jn.erp.wechat.common.api.controller.base.BaseWxAuthController;
import com.jn.erp.wechat.common.api.entity.dto.WxUserDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <pre>
 *
 * </pre>
 *
 * @author sunjiyong
 * @since 2024/12/12 9:41
 */
@RestController
@RequestMapping("/wx/data")
public class MpDataController  extends BaseWxAuthController {


    @Autowired
    private StudentService studentService;

    /**
     *所有或者新增线索数    /enrollmentData/studentDataNum
     * @param dataTrendsVo
     * @return
     */

    @PostMapping("/enrollment/studentDataNum")
    public AjaxResult studentDataNum(@RequestBody DataTrendsVo dataTrendsVo) {
        WxUserDto wxUser = getWxUser();
        dataTrendsVo.setOrgId(wxUser.getOrgIdLong());
        Map list = studentService.clueDataNum(dataTrendsVo);
        return AjaxResult.success(list);
    }


}
